<template>
	<el-card class="form-container" style="width: 85%;">
		<div class="message-title">
			<div>
				<h1>{{messageTextDetail.messageTitle}}</h1>
			</div>
			<div>
				<el-tag type="success">{{messageTextDetail.moduleName}}</el-tag>
				{{messageTextDetail.createTime}}
			</div>
		</div>
		<el-divider></el-divider>
		<div class="ql-snow ql-editor" v-html="messageTextDetail.messageContent"></div>
		<el-divider></el-divider>
		<div align="center">
			<el-button type="info" @click="back">返回</el-button>
		</div>
	</el-card>
</template>

<script>
	import { findMessageTextDetail } from '@/api/platform/message'
	export default {
		name: 'view-messageText',
		data() {
			return {
				messageTextDetail: {}
			}
		},
		created() {
			this.view(this.$route.query.id)
		},
		methods: {
			view(val) {
				findMessageTextDetail(val).then(res => {
					this.messageTextDetail = res.data.responseData
				})
			},
			back() {
				this.$router.go(-1)
			}
		}
	}
</script>

<style>
</style>
